Skip to content

fix(prism): reuse public Lium template without docker cred - #173

Merged
echobt merged 1 commit into
mainfrom
fix/prism-public-template-fallback
Aug 20, 2026
Merged

fix(prism): reuse public Lium template without docker cred#173
echobt merged 1 commit into
mainfrom
fix/prism-public-template-fallback

Conversation

@echobt

@echobt echobt commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Missing PRISM_POD_DOCKER_CREDENTIAL_ID was failing every miner provision when creating the private DO fe1197 template.
  • Provision now reuses an existing public prism-recipe-v9/v10 (or PRISM_POD_TEMPLATE_ID) instead of 500ing submits; credential remains required only to create a new private template.

Test plan

  • cargo test -p prism-lium-harness -p prism-lium --lib -- public_template_fallback ensure_template_falls_back private_template_creation
  • loc-cap / spec-check / clippy on touched crates
  • After merge: digest-only prism-challenge deploy on prod master (v2.1 cutover path)

Summary by CodeRabbit

  • New Features

    • Provisioning can reuse an existing matching Lium template instead of creating a new one.
    • Added fallback to approved public prism-recipe-v9 and v10 templates when private-template creation is unavailable.
    • Added optional PRISM_POD_TEMPLATE_ID configuration for selecting an existing template.
  • Bug Fixes

    • Missing or empty registry credentials no longer block provisioning when an approved public template is available.
  • Documentation

    • Clarified credential requirements, fallback behavior, and configuration options in deployment guides and runbooks.

@echobt
echobt merged commit 374ef2b into main Aug 20, 2026
2 of 3 checks passed
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 38658ad1-562b-4bab-bf5e-7650f5b2a339

📥 Commits

Reviewing files that changed from the base of the PR and between 3b38daf and b3eb160.

📒 Files selected for processing (5)
  • crates/prism-lium-harness/src/lib.rs
  • crates/prism-lium/src/client.rs
  • deploy/env/prism-challenge.env.example
  • docs/PRISM.md
  • docs/runbooks/prism-enable-lium-and-emission.md

📝 Walkthrough

Walkthrough

Lium provisioning now detects missing private-registry credentials, reuses allowlisted public templates when available, and reports an operator-facing error otherwise. The client, tests, environment example, and operator documentation use the new template-resolution behavior.

Changes

Lium template resolution

Layer / File(s) Summary
Credential-aware fallback logic
crates/prism-lium-harness/src/lib.rs
Adds allowlisted public templates, credential validation, template lookup helpers, fallback resolution, and operator-facing errors.
Client template integration
crates/prism-lium/src/client.rs
Updates ensure_template to use credential-aware matching and verifies public v9 reuse without template creation.
Operator configuration and documentation
deploy/env/prism-challenge.env.example, docs/PRISM.md, docs/runbooks/prism-enable-lium-and-emission.md
Documents PRISM_POD_TEMPLATE_ID, Docker credential requirements, and public-template fallback behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant prism-challenge
  participant listed_template_id
  participant Lium_API
  Operator->>prism-challenge: configure template and credential settings
  prism-challenge->>Lium_API: list templates
  prism-challenge->>listed_template_id: resolve template name, image, and credential
  listed_template_id-->>prism-challenge: existing public or private template ID
  prism-challenge->>Lium_API: create private template when no fallback applies
  Lium_API-->>prism-challenge: template creation result or operator-facing error
Loading

Possibly related PRs

  • BaseIntelligence/base#166: Earlier Lium image and template selection logic extended by this credential-aware public-template fallback.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/prism-public-template-fallback

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant